<template>
  <div>
    <!-- 头部刷新区域 -->
    <div class="setdiv">
      <span>商品设置</span>
      <el-button class="refreshRight" plain icon="el-icon-refresh">刷新</el-button>
    </div>
    <!-- 卡片视图区域 -->
    <el-card class="box-card">
      <div slot="header" class="clearfix getColor">
        <span>商品设置</span>
      </div>
      <!-- 用户信息表单区域 -->
      <div class="content">

        <el-form :model="numberValidateForm" ref="numberValidateForm" label-width="100px" class="demo-ruleForm">

          <el-form-item label="超过" prop="time" :rules="[ { required: true, message: '时间不能为空'}, { type: 'number', message: '时间必须为数字值'} ]">

            <el-col :span="10">
              <el-input v-model="ruleForm.time1"><template class="width_Dw" slot="append">小时</template></el-input>
            </el-col>

            <el-col :span="14">
              <p>自动请求商品信息</p>
            </el-col>

          </el-form-item>

          <el-form-item label="超过" prop="time" :rules="[ { required: true, message: '时间不能为空'}, { type: 'number', message: '时间必须为数字值'} ]">

            <el-col :span="10">
              <el-input v-model="ruleForm.time1"><template class="width_Dw" slot="append">小时</template></el-input>
            </el-col>

            <el-col :span="14">
              <p>自动请求库存数据</p>
            </el-col>

          </el-form-item>

        </el-form>
        <el-button type="primary" class="anniu">提交</el-button>
      </div>

    </el-card>
  </div>
</template> 
 <script>
import { number } from "echarts/core";
export default {
  data() {
    return {
      imageUrl: "",
      ruleForm: {
        time1: "24",
        time2: "24",
      },
      numberValidateForm: {
        age: ''
      },
      rules: {
        time1: [
          {
            required: true,
            message: "请输入时间!",
            trigger: "blur",
          },
          {
            type: "number",

            trigger: "blur",
          },
        ],
        time2: [
          {
            required: true,
            message: "请输入时间!",
            trigger: "blur",
          },
          {
            type: "number",
            trigger: "blur",
          },
        ],

      },
    };
  },
  created() { },
  methods: {
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          alert('submit!');
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    resetForm(formName) {
      this.$refs[formName].resetFields();
    }
  }
};
</script> 
<style lang="less" scoped>
.setdiv {
  background-color: #f2f2f2;
  padding: 17.5px 0;
  position: relative;
}
.setdiv > span {
  margin-left: 20px;
}
.refreshRight {
  position: absolute;
  right: 20px;
  top: 8px;
}
.el-card {
  margin: 20px;
}
.set {
  background-color: #f2f2f2;
  padding: 0;
}
.el-card > .set {
  padding: 0;
}
.clearfix > span {
  padding: 0 !important;
}
.el-card /deep/ .el-card__header {
  background-color: #f2f2f2;
}

.anniu {
  margin-left: 47.5%;
  width: 5%;
}
.el-form {
  width: 32%;
  margin-left: 34%;
}

// .el-button {
//     padding: 47.5%;
//     width: 5%;
// }
</style> 